package com.beidouapp.service.impl;

import java.util.Date;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.beidouapp.common.util.DateUtils;
import com.beidouapp.domain.pojo.MonthlySummary;
import com.beidouapp.manager.MonthlySummaryManager;
import com.beidouapp.service.MonthlySummaryService;

@Service
public class MonthlySummaryServiceImpl implements MonthlySummaryService {
	@Autowired
	MonthlySummaryManager monthlySummaryManager;

	@Override
	public List<MonthlySummary> getMonthlyDataStatis() {
		return monthlySummaryManager.getMonthlyDataStatis();
	}

	@Override
	public List<MonthlySummary> getAllMonthlyDataStatis() {
		Date startDate =  
				DateUtils.getMonthFirstDayDate(new Date());
		List<MonthlySummary> monthlySummary = monthlySummaryManager
				.get12MonthlyData(startDate);
		return monthlySummary;
	}

	
	

}